
public class Clock {

    public static void main(String[] args) {
    	Display day = new Display(30, null);
        Display hr = new Display(24, day);
        Display min = new Display(60, hr);
        Display sec = new Display(60, min);
        while(true) {
            sec.increase();
            int m = min.getValue();
            int h = hr.getValue();
//            System.out.printf("%02d:%02d\n",  h, m);
            System.out.printf("%02d-%02d:%02d:%02d\n", day.getValue(), h, m, sec.getValue());
        }
    }

}
